PgLayoutIter

A PangoLayoutIter can be used to iterate over the visual extents of a PangoLayout.

To obtain a PangoLayoutIter, use [method@Pango.Layout.get_iter].

The PangoLayoutIter structure is opaque, and has no user-visible fields.

Constructors

this
this(PangoLayoutIter* pangoLayoutIter, bool ownedRef)

Sets our main struct and passes it to the parent class.

Destructor

~this
~this()
Undocumented in source.

Members

Functions

atLastLine
bool atLastLine()

Determines whether @iter is on the last line of the layout.

copy
PgLayoutIter copy()

Copies a PangoLayoutIter.

free
void free()

Frees an iterator that's no longer in use.

getBaseline
int getBaseline()

Gets the Y position of the current line's baseline, in layout coordinates.

getCharExtents
void getCharExtents(PangoRectangle logicalRect)

Gets the extents of the current character, in layout coordinates.

getClusterExtents
void getClusterExtents(PangoRectangle inkRect, PangoRectangle logicalRect)

Gets the extents of the current cluster, in layout coordinates.

getIndex
int getIndex()

Gets the current byte index.

getLayout
PgLayout getLayout()

Gets the layout associated with a PangoLayoutIter.

getLayoutExtents
void getLayoutExtents(PangoRectangle inkRect, PangoRectangle logicalRect)

Obtains the extents of the PangoLayout being iterated over.

getLine
PgLayoutLine getLine()

Gets the current line.

getLineExtents
void getLineExtents(PangoRectangle inkRect, PangoRectangle logicalRect)

Obtains the extents of the current line.

getLineReadonly
PgLayoutLine getLineReadonly()

Gets the current line for read-only access.

getLineYrange
void getLineYrange(int y0, int y1)

Divides the vertical space in the PangoLayout being iterated over between the lines in the layout, and returns the space belonging to the current line.

getPgLayoutIterStruct
PangoLayoutIter* getPgLayoutIterStruct(bool transferOwnership)

Get the main Gtk struct

getRun
PangoLayoutRun* getRun()

Gets the current run.

getRunBaseline
int getRunBaseline()

Gets the Y position of the current run's baseline, in layout coordinates.

getRunExtents
void getRunExtents(PangoRectangle inkRect, PangoRectangle logicalRect)

Gets the extents of the current run in layout coordinates.

getRunReadonly
PangoLayoutRun* getRunReadonly()

Gets the current run for read-only access.

getStruct
void* getStruct()

the main Gtk struct as a void*

nextChar
bool nextChar()

Moves @iter forward to the next character in visual order.

nextCluster
bool nextCluster()

Moves @iter forward to the next cluster in visual order.

nextLine
bool nextLine()

Moves @iter forward to the start of the next line.

nextRun
bool nextRun()

Moves @iter forward to the next run in visual order.

Static functions

getType
GType getType()

Variables

ownedRef
bool ownedRef;
Undocumented in source.
pangoLayoutIter
PangoLayoutIter* pangoLayoutIter;

the main Gtk struct

Meta